import axiosInstance from './axios';

export const postRequest = (url, data) => {
  return axiosInstance.post(url, data)
    .then(response => response.data)
    .catch(error => {
      console.error('Error in postRequest:', error);
      throw error;
    });
};

export const getRequest = (url, params = {}) => {
  return axiosInstance.get(url, { params })
    .then(response => response.data)
    .catch(error => {
      console.error('Error in getRequest:', error);
      throw error;
    });
};